﻿using UnityEngine;
using System.Collections;
using FrenzyIsland.UI;

public class UITopMenuCtrl : MonoBehaviour {

    public GameObject CharacterMenuPrefab;
    public GameObject PartyMenuPrefab;
    private GuiManager guiManager;

	void Awake(){
        UIRoot root = UIRoot.list[0];
        if (root!=null) {
            GameObject rootObject = root.gameObject;
            this.guiManager = rootObject.GetComponent<GuiManager>();
        }
    }

    public void ShowMenuCharacter_Click(){
        //if (this.guiManager != null) {
        //    GameObject menu = guiManager.OpenMenu(CharacterMenuPrefab);
        //    menu.GetComponent<UIMenuCharactersCtrl>().LoadPeople();
        //    menu.SetActive(true);
        //}
    }

    public void ShowMenuParty_Click(){
        //if (this.guiManager != null) {
        //    GameObject menu = guiManager.OpenMenu(PartyMenuPrefab, new AnchorMargin(0, 0, 0, 0));
        //    menu.GetComponent<UIMenuPartyCtrl>().LoadParty();
        //    menu.SetActive(true);
        //}
    }

}
